class Clients::OrdersController < ApplicationController
  before_filter :check_if_client

  def index
    @orders = current_user.orders.order("id desc").paginate(:page => params[:page])

    respond_to do |format|
      format.html
    end
  end

  def show
    respond_to do |format|
      begin
        @order = current_user.orders.find(params[:id])

        format.html
      rescue
        format.html { redirect_to client_orders_path }
      end
    end
  end

end
